package com.easy.project.convert;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.easy.project.domain.dto.system.UserEditDTO;
import com.easy.project.domain.po.system.SysUserPO;
import com.easy.project.domain.vo.system.SysUserInfoVO;
import com.easy.project.domain.vo.system.SysUserVO;
import org.mapstruct.Mapper;
import org.mapstruct.MappingTarget;

import java.util.List;

@Mapper(componentModel = "spring")
public interface UserDomainConvert {

    SysUserVO poToVo(SysUserPO sysUserPO);

    List<SysUserVO> poListToVoList(List<SysUserPO> sysUserPOList);

    Page<SysUserVO> poPageToVoPage(Page<SysUserPO> sysUserPOPage);

    SysUserPO editDtoToPo(UserEditDTO userEditDTO);

    void editDtoToPo(UserEditDTO userEditDTO,@MappingTarget SysUserPO sysUserPO);

    SysUserInfoVO poToInfoVo(SysUserPO userPO);
}
